package per.mnxc.common;

/**
 * @BelongsProject: spring_stu
 * @BelongsPackage: per.mnxc.common
 * @Author: mnxc
 * @CreateTime: 2022-11-13  23:00
 * @Description: 线程记录id
 * @Version: 1.0
 */
public class BaseContext {
    private static ThreadLocal<Long> threadLocal = new ThreadLocal<>();

    public static void setCurrentId(Long id){
        threadLocal.set(id);
    }
    public static Long getCurrentId(){
        return threadLocal.get();
    }
}
